package com.caishi.lkx.exam.service;

import com.caishi.lkx.exam.model.PaperRecordsModel;
import com.zzw.common.entity.BSDService;
import com.caishi.lkx.exam.ienum.type.PaperRecordType;

import java.util.List;

public interface IPaperRecordsService extends BSDService<PaperRecordsModel, String>, QuestionCollectionService<PaperRecordsModel, String> {

    /**
     * 用户未交卷的试卷
     *
     * @param userId
     * @param columnType
     * @param paperId
     * @return
     */
    PaperRecordsModel userNotFinishPaperRecords(String userId, PaperRecordType columnType, String paperId);

    /**
     * 删除用户的所有试卷记录
     *
     * @param userId
     * @param categoryId
     */
    void delUserAllRecords(String userId, Long categoryId);

    /**
     * 用户完成的试卷数量
     *
     * @param userId
     * @return
     */
    int userFinishPaperCount(String userId, Long categoryId);

    /**
     * 获取用户的试卷记录 (软删除失效)
     *
     * @param userId
     * @param paperRecordType
     * @param paperId
     * @return
     */
    List<PaperRecordsModel> questionRecord(String userId, PaperRecordType paperRecordType, String paperId);
}
